def update_dictionary(d, key, value):
    if key in d:
        x = d[key]
        x.append(value)
    else:
        key = key*2
        if key in d:
            x = d[key]
            x.append(value)
        else:
            d[key] = [value]

d = {}
print(update_dictionary(d, 1, -1))
print(d)
print(update_dictionary(d, 2, -2))
print(d)
print(update_dictionary(d, 1, -3))
print(d)
print(update_dictionary(d, 5, -3))
print(d)


